<?php if (Zend_Auth::getInstance()->getIdentity()->login !== $this->user_login) :?>

<?php 
$model_friend = new Model_Friend();
$message = $model_friend->checkIfFriends(Zend_Auth::getInstance()->getIdentity()->id, $this->user_id);
?>

							<?php if($message):?>
							<a
								href="<?php
							    echo $this->url(array('controller' => 'friend', 'action' => 'remove', 'request'=>$this->user_id),"default")?>"><?php
							    echo $this->translate("Remove from friends");
							    ?></a>
							<?php else:?>
							<a
								href="<?php
							    echo $this->url(array('controller' => 'friend', 'action' => 'request'),"default")?><?php echo "?login=".$this->user_login ?>"><?php
							    echo $this->translate("Add to friends");
							    ?></a>
							<?php endif;?>
	
			   
			   
			    <?php $model_user = new Model_User(); 
			    if($model_user->checkOnline($this->user_id)){
			    	echo $this->translate("Online");
			    		}else{
			    	echo $this->translate("Offline");
			    		}
			    		?>
			    
			    <?php echo $this->render('messageForm.phtml')?>
			    
<a class="alert" href="#">
     <?php echo $this->translate("Send message");?>
 </a>
 
<?php else:?>

			
				<style type="text/css">
				    #my_guests div
				    {
				        position:absolute;
				    }
				</style>
			<p>

				<div id="my_guests">
			<?php foreach ($this->guests as $guest):?>
				<?php $model_guest = new Model_User($guest->friend_id);
				
				 ?>
				<div style="z-index: 1000">
				
					
					<a
					href="<?php
				    echo $this->url(array('controller' => $model_guest->login, 'action' => null , 'request' => null),"default")?>"><?php
				   	
				    ?>
				    	<img class="tipClass" id="tipImage" title="<?php echo $model_guest->login?>" style="border:0" src="<?php echo $this->baseUrl('img' . DIRECTORY_SEPARATOR)?>track.png" alt="avatar image">
				    
				    </a>
			    </div>
				<?php endforeach;?>
				</div>
				
<?php endif;?>




</p>
<div <?php if($this->is_user_profile) echo 'id="avatar_drag"' ?> class="ui-draggable" style="
	width: 100px; height: 100px;
	position:absolute;
	left:<?php echo $this->user->ava_y ?>px; 
	top:<?php echo $this->user->ava_x ?>px">
	<?php echo $this->render('index/inc/u_avatar.phtml')?>
</div>

<div <?php if($this->is_user_profile) echo 'id="sex_drag"' ?> class="ui-draggable" style="
	width: 100px; height: 100px;
	position:absolute;
	left:<?php echo $this->user->sex_y ?>px; 
	top:<?php echo $this->user->sex_x ?>px">
	<?php echo $this->render('index/inc/u_sex.phtml')?>
</div>

<div <?php if($this->is_user_profile) echo 'id="status_drag"' ?> class="ui-draggable" style="
	width: 100px; height: 100px;
	position:absolute;
	left:<?php echo $this->user->status_y ?>px; 
	top:<?php echo $this->user->status_x ?>px">
	<?php echo $this->render('index/inc/u_status.phtml')?>
</div>


<div <?php if($this->is_user_profile) echo 'id="album_drag"' ?> class="ui-draggable" style="
	width: 100px; height: 100px;
	position:absolute;
	left:<?php echo $this->user->album_y ?>px; 
	top:<?php echo $this->user->album_x ?>px">
	<?php echo $this->render('index/inc/u_album.phtml')?>
</div>




